package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class OverlapsPredicate implements Predicate {

    private int beginIndex;
    private int endIndex;
    private RowValuePredicand overlapsPredicatePart1;
    private OverlapsPredicatePart2 overlapsPredicatePart2;

    public OverlapsPredicate(RowValuePredicand overlapsPredicatePart1, OverlapsPredicatePart2 overlapsPredicatePart2) {
        this.beginIndex = overlapsPredicatePart1.getBeginIndex();
        this.endIndex = overlapsPredicatePart2.getEndIndex();
        this.overlapsPredicatePart1 = overlapsPredicatePart1;
        this.overlapsPredicatePart2 = overlapsPredicatePart2;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public RowValuePredicand getOverlapsPredicatePart1() {
        return overlapsPredicatePart1;
    }

    public OverlapsPredicatePart2 getOverlapsPredicatePart2() {
        return overlapsPredicatePart2;
    }

}
